﻿@using Microsoft.AspNetCore.Mvc.Localization
@using Skoruba.IdentityServer4.Admin.BusinessLogic.Identity.Dtos.Grant
@using Skoruba.IdentityServer4.Admin.UI.Configuration.Constants
@model PersistedGrantDto
@inject IViewLocalizer Localizer

@{
	ViewBag.Title = Localizer["PageTitle"];
	Layout = "_Layout";
}	

<div class="row">
	<div class="col-12">
		<nav aria-label="breadcrumb">
			<ol class="breadcrumb">
				<li class="breadcrumb-item"><a asp-area="@CommonConsts.AdminUIArea" asp-controller="Grant" asp-action="PersistedGrants">@Localizer["NavigationPersistedGrants"]</a></li>
				<li class="breadcrumb-item"><a asp-area="@CommonConsts.AdminUIArea" asp-controller="Grant" asp-action="PersistedGrant" asp-route-id="@Model.SubjectId">@Model.SubjectId</a></li>
				<li class="breadcrumb-item active" aria-current="page">@Localizer["PageTitle"]</li>
			</ol>
		</nav>
	</div>

	<div class="col-12">
		<h2>@Localizer["PageTitle"]</h2>
	</div>
</div>

<form asp-area="@CommonConsts.AdminUIArea" id="client-form" asp-controller="Grant" asp-action="PersistedGrantDelete" Method="post">

	<input type="hidden" asp-for="Key" />

	<div class="row table-responsive">
		<div class="col-12">
			<table class="table table-striped">
				<thead>
				<tr>
					<th>@Localizer["TableSubjectId"]</th>
					<th>@Localizer["TableType"]</th>
					<th>@Localizer["TableExpiration"]</th>
					<th>@Localizer["TableData"]</th>
					<th>@Localizer["TableClient"]</th>
				</tr>
				</thead>

				<tbody>
				<tr>
					<td>@Model.SubjectId</td>
					<td>@Model.Type</td>
					<td>@Model.Expiration</td>
					<td>@Model.Data</td>
					<td>@Model.ClientId</td>
				</tr>
				</tbody>
			</table>
		</div>
	</div>

	<div class="row">
		<div class="col-md-12">
			<button type="submit" class="btn btn-danger">@Localizer["ButtonDeleteGrant"]</button>
		</div>
	</div>
</form>